<?php
require('includes/top.php');

$datacard_id = $_POST['datacard_id'];
$datacards = $_POST['datacards'];
$card_no = $_POST['card_no'];
$RSN_no = $_POST['RSN_no'];
$box_no = $_POST['box_no'];
$depot_location = $_POST['depot_location'];


$sql = "UPDATE data_card SET `datacard_name` = '".$datacards."', `card_no` = '".$card_no."', `RSN_no` = '".$RSN_no."', `box_no` = '".$box_no."',`depot_location` = '".$depot_location."' where datacard_id='".trim($datacard_id)."'";
$result=mysql_query($sql);


if($result>0)
{
header('Location: datacard_details.php?v=success');
}
else
{
header('Location: datacard_details.php?v=err');
}
?>